# $Id$
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=gitg
pkgver=3.26
pkgrel=1
pkgdesc='A GIT repository viewer based on GTK+'
arch=('i686' 'x86_64')
url='https://git.gnome.org/browse/gitg/'
license=('GPL')
depends=('gtksourceview3' 'git' 'desktop-file-utils' 'libgit2-glib' 'libgee' 'webkit2gtk' 'libpeas' 'gtkspell3'
         'python-gobject')
makedepends=('intltool' 'vala' 'gobject-introspection' 'gnome-common' 'glade' 'git')
groups=('gnome-extra')
_commit=096e96e3d13f50cd6de8b289a54362d54f502810  # tags/v3.26^0
source=("git+https://git.gnome.org/browse/gitg#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --enable-glade-catalog

  # Don't overlink
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="${pkgdir}" install
}
